#include <iostream>
using namespace std;

#include "stack.h"

int rekFakSim(int);

int main()
{
	int result = rekFakSim(5);
	cout << result << endl;
	system("pause");
	return 0;
}

int rekFakSim(int n)
{
	stack<int> s;
	for (int i = n; i > 0; i--)
	{
		s.push_top(i);
	}

	int result = 1;
	while (!s.isEmpty())
	{
		result *= s.top();
		s.pop_top();
	}
	return result;
}